package DB;

import java.util.ArrayList;

public interface DirDBMan 
{
	/**
	 * add new Directory to the table
	 * @param path string that contain the path of the directory
	 * @return {@link Directories} of the new directory or null if it doesn't exist
	 */
	public Directories addDir(String path);
	/**
	 * add new expression to the table
	 * @param exp string that contain the regular expression
	 * @param path string that contain the path of the directory
	 * @return true if succeed to add the expression to the requested directory, or false if not. 
	 */
	public boolean addRegExToDir(String exp, String path);
	/**
	 * delete expression from requested directory
	 * @param exp {@link String} that contain the regular expression
	 * @param path {@link String} that contain the path of the directory
	 * @return {@link Boolean} true if succeed to delete the expression from the requested directory, or false if not. 
	 */
	public boolean delRegExpFromDir(String exp, String path);
	/**
	 * delete all the expressions on the table
	 */
	public void delAllRegExp();
	/**
	 * delete all the directories on the table
	 */
	public void delAllDirs();
	/**
	 * delete expression from the table
	 * @param exp string that contain the expression
	 * @return  {@link Boolean} true if succeed to delete the expression, or false if not. 
	 */
	public boolean deleteRegExp(String exp);
	/**
	 * this function return all the dirs that the user chose for them the requested expression
	 * @param exp string with the expression
	 * @return {@link ArrayList} that contain all the paths of the dirs
	 */
	public ArrayList<String> getDirs(String exp);
	/**
	 * this function return all the expressions that the user chose for them the requested dir
	 * @param path string with the path of the directories
	 * @return {@link ArrayList} that contain all the names of the expressions
	 */
	public ArrayList<String> getExps(String path);
	/**
	 * add new expression to the table
	 * @param exp {@link String} that contain the regular expression
	 * @return {@link RegExpres} an object of the new expression or null if it doesn't exist
	 */
	public RegExpres addExp(String exp);
	/**
	 * delete directory from the table
	 * @param path {@link String} that contain the path of the directory
	 * @return true if succeed to delete the directory, or false if not. 
	 */
	public boolean deleteDir(String path);
	/**
	 * this function return all the directories that in the table
	 * @return {@link ArrayList} that contain all the paths of the dirs
	 */
	public ArrayList<String> getAllDirs();
	/**
	 * this function return all the expressions that in the table
	 * @return {@link ArrayList} that contain all the names of the expressions
	 */
	public ArrayList<String> getAllExps();
}
